<html>
<body>

<?php

	
	$con = mysql_connect("localhost","root");  //Connect to mysql Server
		if (!$con){
			die('Could not connect: ' . mysql_error()); //Error if no connection
  		}

	
	mysql_select_db("capstone",$con); //Connect to Database

	$result = mysql_query("SELECT * from test");  //Query table "test" on above database

	if($result === FALSE) {
   		die(mysql_error()); // Error check for not connecting to database
	}


	while($row = mysql_fetch_array($result)){  //Displays Results of database
		
		echo "Report " . $row['ID'] . ": Latitude: " . $row['Latitude'] . " Longitude: " . $row['Longitude'] . " Type: " . $row['Type'];
		echo "<br />";
	}


	mysql_close($con);

?>

</body>
</html>
